home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 45
/
Amiga Format CD45 (1999-09)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-11].iso
/
-serious-
/
misc
/
mcread
/
original
/
text.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-08-09
|
949b
|
42 lines
/* mcread: text.c
Copyright (C) 1991, Mike Gleason Jr & NCEMRSoft.
All Rights Reserved. */
#include <stdio.h>
#include "mcread.h"
/*ARGSUSED*/
int thrash_text(in, name, dataforklen, isTeachText)
register FILE *in;
char *name;
long dataforklen;
register short isTeachText;
{
int c;
register long bytesIn;
bytesIn = 0L;
wwInit(); c = 0;
while (bytesIn < dataforklen && c != EOF) {
wwInit();
while (bytesIn < dataforklen && (c = getc(in)) != EOF) {
bytesIn++;
if (isTeachText && c == HARDSPACE) { /* TeachText inserts PICTs starting at id=1000,*/
(void) puts("### picture omitted!");/* when it encounters a hard space. */
while ((c = getc(in)) == '\r') bytesIn++; /* Now, eat a bunch of blank lines. */
(void) ungetc (c, in); bytesIn--;
}
else {
if (wwPutchar(c & 0x00ff))
return (0);
if (c == '\r') break;
}
}
if (wwFlush())
return (0);
}
return (0);
} /* thrash_text */
/* eof */